package com.heima.zuoye.day09.timu5;

import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class Demo1 {
    public static void main(String[] args) throws Exception {
        List<Student> list = new ArrayList<>();
        list.add(new Student("张三", "男", "20", "88"));
        list.add(new Student("李四", "女", "19", "99"));
        FileWriter fw = new FileWriter("student.txt");
        int lin;
        for (Student s : list) {
            fw.write(s.toString());
            fw.write("\s\r");
        }
        fw.close();
    }
}
